# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=ginkgo
pkgver=2.1.4
pkgrel=1
pkgdesc="Modern Testing Framework for Go"
url="https://onsi.github.io/ginkgo/"
license="MIT"
arch="all !armv7 !armhf !x86" # FTBFS on 32-bit arches
makedepends="go"
source="https://github.com/onsi/ginkgo/archive/v$pkgver/ginkgo-$pkgver.tar.gz"

export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw"
export GOPATH="$srcdir"

build() {
	go build -v -ldflags "-s -w" -o bin/ginkgo ./ginkgo
}

check() {
	# integration tests are slow
	# types fail on CodeLocation tests
	./bin/ginkgo -r --randomize-all --randomize-suites \
		--skip-package ./integration,./types
}

package() {
	install -Dm755 bin/ginkgo "$pkgdir"/usr/bin/ginkgo
}

sha512sums="
bbbc101d38b528bd5e9d4676f796901f1d9d13257f66d90c2ebbd4bebe1051aedbf97799d0b5ee06eb384afa707340a5bc387ff3f23353e6c17e58df7ace0306  ginkgo-2.1.4.tar.gz
"
